/**
 * Created by ${PRODUCT_NAME}.
 * User: skylerparr
 * Date: 12/14/10
 * Time: 9:38 PM
 * To change this template use File | Settings | File Templates.
 */
package com.thoughtorigin.meta.mock {
import com.thoughtorigin.meta.MetaType;
import com.thoughtorigin.reflect.MetaDataItem;

public class MockMetaType implements MetaType {
    public var _object: Object;
    public var _metadata: MetaDataItem;
    public var _callback: Function;
    public var _clazz: Class;
    public var _disposed: Boolean;
    public var _priority: int;
    public var _counter: int;
    public static var _callNumber: int;

    public function MockMetaType() {
    }

    public function decorate(object:Object, metadata:MetaDataItem, callback:Function):void {
        _object = object;
        _metadata = metadata;
        _callback = callback;
        _callNumber++;
        _counter = _callNumber;
        _callback.call(this);
    }

    public function preprocess(clazz:Class, metadata:MetaDataItem):void {
        _clazz = clazz;
        metadata = metadata;
    }

    public function get priority():int {
        return _priority;
    }

    public function dispose(... args):void {
        _disposed = true;
    }
}
}
